package com.example.riskmanage.controller;


import com.example.riskmanage.bean.Historylist;
import com.example.riskmanage.service.HistorylistManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HistorylistController {
    @Autowired
    HistorylistManager historylistManager;

    @RequestMapping("/historylist")
    public String historylist(Integer id) {


        String RESPONE = historylistManager.getHistorylistService(id);
        return RESPONE;

    }

    @RequestMapping("/addhistorylist")
    public String add(@RequestBody Historylist historylist) {
        String flag = historylistManager.addHistorylistService(historylist);
        return flag;
    }

    @RequestMapping("/deletehistorylist")
    public String delete(Integer id) {
        String flag = historylistManager.deleteHistorylistService(id);
        return flag;
    }

    @RequestMapping("/cmyhistorylist")
    public String cmy(Integer id) {
        String biao = historylistManager.cmyHistorylistService(id);
        return biao;
    }

}